
# set the project version
VERSION := 0.1.0

# set the application name
APP_NAME := dn

# set the output file
OUTPUT := dn

# set the install directories
INSTL_DIRS := /usr/local/bin

# set the compiler
CC := cc

# set the linked libraries
LIBS := -lmicrohttpd -lcurl -lcjson -lssl -lcrypto -lmariadbclient

# set all header directories
INC_DIRS := -I . \
	    -I ./include

# set the installing headers
INSTL_INCS := $(wildcard ./*.h) \
	      $(wildcard ./cic/*.h) \
	      $(wildcard ./ccas/*.h)

# set the main source
MAIN := $(wildcard ./*.c) \
	$(wildcard ./ccas/ccas.c)

# set flags of the compiler
CFLAGS := -O3 -Wall -Werror

# set all .PHONY
.PHONY: all

# set the output list 
all: $(APP_NAME)

# set the main app
$(APP_NAME) : $(MAIN)
			$(CC) $(CFLAGS) $^ $(INC_DIRS) $(LIBS) -o $@
			
clear:
	rm $(APP_NAME)

